IoT Orchestrator

← Back

⠀⠀

Available Integrations

NameDescriptionStatus
AutomationsAn integration that is the glue of the system. Handles plumbing events together, such as routing button events to light changedindev
DiscoverabilityBroadcasts an mDNS service advertising its ability to orchestrate. Used for various things, such as the Arduino sketch and mobile app. Can be configured to display different name.complete
KasaA wrapper around the tplink-smarthome-api npm package. Supports bulbs and plugs, but no autodiscovery as of yet.incomplete
PoweroffSimple script that allows the server to be shutdown with a command. NOTE: requires setup from this articlecomplete
WledProxy and bridge for WLED . Proxies WebSocket traffic so as not to overload the target node and also provides master lighting controls such as preset, power, and brightness.broken
Wled-segmentSlave to wled integration. Connects to the proxy, exposes individual segment as a light fixture.complete

MQTT Structure

TermExplanation
orchestratorMain daemon that monitors integrations and aggregates state updates into an object (main.go)
namespaceThe root-level path used for identifying integrations
routeThe topic of an MQTT message, showing which integration (if any) should process the message
emitterA specific type of route where data is published to
commandA route where, upon receiving a message, invokes a function in the receiving integration
fetcherA command that triggers the integration to rebroadcast its data
managed (integration)An integration started, stopped, and watched by the orchestrator. Example: kasa.js
unmanaged (integration)An integration that is not controlled by the orchestrator and only utilizes the bus. Example: ESP8266

Orchestrator (main.go)

RouteTypeDescription
/orchestratornamespaceReserved namespace for all orchestrator-related functions
/orchestrator/statusemitterStatus of all integrations as a map
/orchestrator/stateemitterState of all integrations. Entries can be null if no state was received
/orchestrator/schemasemitterMap of auto-generated integration schemas. Read from startup from "schemas/".
/orchestrator/enabledIntegrationsemitterConfig for all integrations, directly taken from enabledIntegrations field in config.json
/orchestrator/erroremitterOrchestrator-specific error messages
/orchestrator/getdata/statusfetcherTriggers emission of status
/orchestrator/getdata/statefetcherTriggers emission of state
/orchestrator/getdata/schemasfetcherTriggers emission of schemas
/orchestrator/getdata/enabledIntegrationsfetcherTriggers emission of enabledIntegrations
/orchestrator/getdata/fullStatefetcherTriggers emission of state, status, & schemas
/orchestrator/integration/(id)/onlineemitterNot handled by orchestrator, integrations emit they are online (true) or not (false)
/orchestrator/integration/startcommandAttempt to start an integration (if it's managed)
/orchestrator/integration/(id)/stopcommandStop an integration (only if it's managed)